import React,{Component} from 'react';
import {Route, Link} from 'react-router-dom';

import ShopAdd from './ShopAdd';
import ShopList from './ShopList';

class Shop extends Component {
    constructor(props) {
        super(props);
        this.state = {  };
    }
    render() {
        return (
            <div className="tab01">
                <div className="content">
                    <div className="left">
                        <Link to="/shop/">商户列表</Link>
                        <br/>
                        <Link to="/shop/shopadd">增加商户</Link>
                    </div>
                    <div className="right">
                        <Route exact path={`${this.props.match.url}/`} component={ShopList}/>
                        <Route path={`${this.props.match.url}/shopadd`} component={ShopAdd}/>
                    </div>
                </div>
            </div>
        );
    }
}

export default Shop;